package hu.veilingsite.client;

import java.util.ArrayList;
import java.util.Date;

import hu.veilingsite.shared.Auction;
import hu.veilingsite.shared.Bid;
import hu.veilingsite.shared.Category;
import hu.veilingsite.shared.ClientUser;
import com.google.gwt.user.client.rpc.AsyncCallback;

/**
 * The async counterpart of <code>GreetingService</code>.
 */
public interface ServiceAsync {
	void login(String user,String pass , AsyncCallback<Boolean> callback);
	void registreer(String name, String password, String email, String address, String residence, int birthdateday, int birthdatemonth, int birthdateyear, AsyncCallback<Boolean> callback);
	void getUser(String email, AsyncCallback<ClientUser> callback);
	void getUser(int user_id, AsyncCallback<ClientUser> getClientUserCallback);
	void updatePassword(String password,String email, AsyncCallback<Boolean> callback);
	void updateUser(ClientUser user, AsyncCallback<Boolean> callback);
	void getUsers(AsyncCallback<ArrayList<ClientUser>> gebruikers);
	void getLatestAcutions(AsyncCallback<ArrayList<Auction>> callback);
	void createBieding(int userID, int auctionID, int offer, Date date, AsyncCallback<Boolean> asyncCallback);
	void getAllAuctions(AsyncCallback<ArrayList<Auction>> getAllAuctions);
	void getAllAuctionsFromUser(int id, AsyncCallback<ArrayList<Auction>> getAllAuctionsFromUser);
	void createAuction(int ai, int ci, String tt, String dp, int sp, Date ed, int vs,AsyncCallback<Boolean> createAuction);
	void updateCategory(Category cat, AsyncCallback<Boolean> updateCallback);
	void getCategories(AsyncCallback<ArrayList<Category>> getCallback);
	void insertCategory(Category cat, AsyncCallback<Boolean> updateCallback);
	void deleteCategory(int editingId, AsyncCallback<Boolean> updateCallback);
	void getAuction(int id, AsyncCallback<Auction> getAuction);
	void valCoupon(String coup, ClientUser cu, AsyncCallback<Integer> callback);
	void getYears(AsyncCallback<ArrayList<Integer>> getYearCallback);
	void getHighestBid(String string, int year, int month, int week, int day, AsyncCallback<Bid> getBidCallback);
	void deleteAuction(int id, AsyncCallback<Void> callback);
	void getCategory(int id, AsyncCallback<Category> getCategoryCallback);
	void getBestBidAuctions(AsyncCallback<ArrayList<Auction>> getAuctionsCallback);
	void getAuctionAdmin(AsyncCallback<ArrayList<Auction>> veilingen);
	void getBidsFromAuction(int auctionID, AsyncCallback<ArrayList<Bid>> asyncCallback);
	void getBidsFromUser(int id, AsyncCallback<ArrayList<Bid>> getBidsFromUser);
	void getNameOfUser(int userId, AsyncCallback<String> getNameOfUser);
	void saveAuction(Auction veiling, AsyncCallback<Void> niks);
	void deleteBid(int bidId, AsyncCallback<Boolean> deleteBid);
	void acceptBid(int bidId, AsyncCallback<Boolean> acceptBid);
}
